﻿package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.KeyboardEvent;
	import tbo.model.Player;
	import tbo.view.BattleView;

	/**
	 * ...
	 * @author ...
	 */
	public class Main extends Sprite 
	{
	
		
		protected var _battleView:BattleView;
		
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			Player.loadUnits();
			
			_battleView = new BattleView();
			this.addChild(_battleView);
			
		}
		

		
	}
	
}